/*
 * @lc app=leetcode.cn id=9 lang=csharp
 *
 * [9] 回文数
 */

// @lc code=start
public class Solution {
    public bool IsPalindrome(int x) {
        if(x < 0)
            return false;
        int temp = x;
        int result = 0;
        while(temp != 0)
        {
            result = result * 10 + temp % 10;
            temp /= 10;
        }
        return result == x;
    }
}
// @lc code=end

